Skip to content

Read the Malaysian honours Datuk, Dato', Datin and Hajah as titles, and Tun, Haji, Tan Sri and Puan Sri under locales.MS - #1514

Merged
derek73 merged 3 commits into
masterfrom
feat/malaysian-honours-1180
Nov 21, 2026
Merged

derek73 merged 3 commits into
masterfrom
feat/malaysian-honours-1180

Conversation

@derek73

@derek73 derek73 commented Nov 21, 2026

Copy link
Copy Markdown
Owner

Relates to #1180 (the issue stays open for the shapes left out, below).

What changes

Word Kind Where it reads
Datuk, Dato', Dato’ (typographic apostrophe), Datin nobility by default
Hajah religious by default
Tun, the bare Dato nobility, default = false locales.MS
Haji religious, default = false locales.MS
Tan Sri, Puan Sri phrases (rules/H9) locales.MS

Each addresses the given name, as Sir does (rules/H1): parse("Datuk Ahmad bin Ali") gives title 'Datuk', given 'Ahmad', where 1.4.0 through 3.1.0 gave given 'Datuk', middle 'Ahmad'.

  • The phrases. tan and sri get given readings in mul.toml, which gates their titles in ms.toml, so each is a title only in its phrase. tan and puan attach to sri. Alone, under the pack, Tan Chee Chai keeps given 'Tan' and reports title-or-name; by default nothing moves and nothing is reported.

  • The build check (decided 2026-11-21, option B). tools/vocab/build.py used to refuse a phrase whose two halves are both off by default. It now admits a partner that is off by default in the reading's own file, when the reading is off by default too. It still refuses:

    • a partner with no title reading;
    • a partner with only a name reading;
    • a partner only another file turns on;
    • a partner off by default beside a reading on by default.

    Each refusal has a mutation row. Option A, turning sri's gated title on by default and narrowing hi.toml's exclusion, was declined: it changed the default to satisfy a tool rule. decisions/vocabulary-model records why.

  • Lexicon and the choice. Lexicon.add has no such check and gets none: a phrase naming no title word compiles to nothing, which is harmless. Under a choice, the compile builds a phrase only from the title words the chosen pool holds. _compiled.py holds no tan, sri or puan title. strict=True with ms reads both phrases too.

Measured against master 488ea60

Run with local_agreement.py --base (and --locale ms, which compares against master's pack), snapshot.py --local --base, and config_diff.py diff default plain:MS in each tree.

Population Default locales.MS
my-candidates (3,077 names) 174 move, each an honour now the title; none broken, though the word behind it is still not the given name where it is a qualifier (SERI, SRI, #1334) or a title off by default (HAJI) 248 read differently from the default (master's pack: 117): 197 a title in the role fields, 51 a new report only
ORCID 0 fixed, 0 broken, 3 changed (honours typed into the given box) 26 regressions: haji 17, tun 5, dato 4, almost all outside Malaysia
Companies House 1 regression (a given name Hajah) 36, of which haji 30, mostly the honour typed into the forename box
PatentsView 0 broken, 1 title typed in 4
opensanctions-parliaments, nepal-candidates, committed snapshot no moves —

Country rows (MY, ID, SG) move by at most 0.1 point under the pack.

Accepted costs. The decisions entry records each one:

  • By default: a woman whose given name is Hajah.
  • Under the pack:
    • a given name or surname Tun or Haji (Encik Tun Yoke Wah, Haji A);
    • Tan Sri Wahyuni;
    • a style before Tan or Sri (Hon. Tan Ah Kow gives title 'Hon. Tan');
    • the phrase cut short (Tan Sri alone gives title 'Tan');
    • the bare Dato of an Italian or Georgian name;
    • the title-or-name report on Tan and Sri.

Left out, per the brief:

Found and not changed: under the pack, Dato' Ustaz Idris reads family 'Idris', because the title run addresses as ustaz does (#1179's reading).

Docs

Checks

  • Suite: 55,909 passed. Serial tests: 39 passed. 3.15 in its own environment and the suite without the ja extra: each 55,877 passed.
  • ruff and mypy: clean. build.py --check: current.
  • parity_check.py: 0 of 757 rows.
  • Sphinx doctest and README doctest: clean.

Reviews

🤖 Generated with Claude Code

derek73 and others added 3 commits November 21, 2026 12:07
…nd Tun, Haji, Tan Sri and Puan Sri under locales.MS (#1180)

Datuk, Dato' (with either apostrophe), Datin and Hajah are titles by
default in ms.toml, each addressing the given name as Sir does
(rules/H1). Tun, Haji, the bare Dato and the phrases Tan Sri and Puan
Sri are titles written default = false, which locales.MS turns on:
each word is a name elsewhere. Tan and Sri get given readings in
mul.toml, so each title is gated (rules/H9) and read only in its
phrase.

The build refused a phrase whose two halves are both off by default.
Its attaches check now admits a partner whose title reading is off by
default in the reading's own file, where the reading is off by default
too, and still refuses a partner with no title reading or one another
file's choice turns on (decisions/vocabulary-model, 2026-11-21 #1180).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d the records (#1180)

The decisions entry read the default's my-candidates moves as all
right; it now says which words behind an honour are still not the
given name and that rules/P12's abdul loses a word to the peel. Under
the pack it records the given name Tun and Haji, a style before Tan
or Sri (Hon. Tan Ah Kow), and the phrase cut short, and reads the
Companies House Haji records as the box-scoring artifact #1469 found.
Its breakdowns now add up.

The build check gets mutation rows for a partner with only a name
reading in the file, a partner off by default beside a reading on by
default, and the kind-name branch, a test of the admitted case under
a choice, and the file hint on the kind-name branch too. Case rows pin
the accepted costs, the comma shapes and the spellings; locale tests
pin both family-first orders and the other choices. The #1179 and
#1180 release bullets are one; indic-honorifics records haji under the
pack; the rules corpus and snapshot take the new H1 example.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…note and the release bullet (#1180)

indic-honorifics' new line said the #1469 strict-choice bullet no
longer held under MS; that bullet is about qari, moulana, alhaj and
alhajj, which still read as given names there, and only haji, which
it left out of every choice, moved. ORCID's changed records hold 7
given names Tun, not 6; PatentsView's three more are recorded. The
Hon. Tan cost is the pack's own, only Hon. Sri being option A's. The
style claim names the five corpora read. The merged release bullet
keeps the Sri and Seri limit and one example. A case note compared
Tan Sri with Field Marshal the wrong way, and three names from private
records are replaced with invented ones.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@derek73 derek73 added this to the 3.2 milestone Nov 21, 2026
@derek73 derek73 added enhancement vocabulary Fixed by a word-list entry: per-word vocabulary and language packs titles Titles and honorifics (rules/H) labels Nov 21, 2026
@derek73 derek73 self-assigned this Nov 21, 2026
@derek73
derek73 merged commit bdc466d into master Nov 21, 2026
14 checks passed
@derek73
derek73 deleted the feat/malaysian-honours-1180 branch November 21, 2026 22:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement titles Titles and honorifics (rules/H) vocabulary Fixed by a word-list entry: per-word vocabulary and language packs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant